Skip to main content
POST
/
v1
/
gateway-configs
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const gatewayConfigView = await client.gatewayConfigs.create({
  auth_mechanism: { type: 'type' },
  endpoint: 'endpoint',
  name: 'name',
});

console.log(gatewayConfigView.id);
{
  "id": "<string>",
  "name": "<string>",
  "endpoint": "<string>",
  "auth_mechanism": {
    "type": "<string>",
    "key": "<string>"
  },
  "create_time_ms": 123,
  "account_id": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters required to create a new GatewayConfig.

name
string
required

The human-readable name for the GatewayConfig. Must be unique within your account.

endpoint
string
required

The target endpoint URL (e.g., 'https://api.anthropic.com').

auth_mechanism
object
required

How credentials should be applied to proxied requests. Specify the type ('header', 'bearer') and optional key field.

description
string | null

Optional description for this gateway configuration.

Response

GatewayConfig created successfully.

A GatewayConfig defines a configuration for proxying API requests through the credential gateway. It specifies the target endpoint and how credentials should be applied.

id
string
required

The unique identifier of the GatewayConfig.

name
string
required

The human-readable name of the GatewayConfig. Unique per account (or globally for system configs).

endpoint
string
required

The target endpoint URL (e.g., 'https://api.anthropic.com').

auth_mechanism
object
required

How credentials should be applied to proxied requests.

create_time_ms
integer<int64>
required

Creation time of the GatewayConfig (Unix timestamp in milliseconds).

account_id
string | null

The account ID that owns this config.

description
string | null

Optional description for this gateway configuration.